#include <stdio.h>
#include <string>
#include "convex_hull.h"
#include "geometry.h"

int main()
{
   int n = 0;
   std::cin >> n;
   std::vector<Point> point_list(n);

   for (int i = 0; i < n; i++)
      std::cin >> point_list[i];

   Segm res;
   if (point_list.size() != 2)
      res = find_the_furthest(convex_hull(point_list));
   else
      res = Segm(point_list[0], point_list[1]);

   std::cout << res.a.x << " " << res.a.y << "\n" << res.b.x << " " << res.b.y << "\n";
   return 0;
}